package com.sgcc.system.service.impl;

import java.util.List;
import com.sgcc.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.sgcc.system.mapper.SysAreaSortMapper;
import com.sgcc.system.domain.SysAreaSort;
import com.sgcc.system.service.ISysAreaSortService;

/**
 * SysAreaSortService业务层处理
 * 
 * @author sgcc
 * @date 2021-03-29
 */
@Service
public class SysAreaSortServiceImpl implements ISysAreaSortService 
{
    @Autowired
    private SysAreaSortMapper sysAreaSortMapper;

    /**
     * 查询SysAreaSort
     * 
     * @param id SysAreaSortID
     * @return SysAreaSort
     */
    @Override
    public SysAreaSort selectSysAreaSortById(Long id)
    {
        return sysAreaSortMapper.selectSysAreaSortById(id);
    }

    /**
     * 查询SysAreaSort列表
     * 
     * @param sysAreaSort SysAreaSort
     * @return SysAreaSort
     */
    @Override
    public List<SysAreaSort> selectSysAreaSortList(SysAreaSort sysAreaSort)
    {
        return sysAreaSortMapper.selectSysAreaSortList(sysAreaSort);
    }

    /**
     * 新增SysAreaSort
     * 
     * @param sysAreaSort SysAreaSort
     * @return 结果
     */
    @Override
    public int insertSysAreaSort(SysAreaSort sysAreaSort)
    {
        sysAreaSort.setCreateTime(DateUtils.getNowDate());
        return sysAreaSortMapper.insertSysAreaSort(sysAreaSort);
    }

    /**
     * 修改SysAreaSort
     * 
     * @param sysAreaSort SysAreaSort
     * @return 结果
     */
    @Override
    public int updateSysAreaSort(SysAreaSort sysAreaSort)
    {
        sysAreaSort.setUpdateTime(DateUtils.getNowDate());
        return sysAreaSortMapper.updateSysAreaSort(sysAreaSort);
    }

    /**
     * 批量删除SysAreaSort
     * 
     * @param ids 需要删除的SysAreaSortID
     * @return 结果
     */
    @Override
    public int deleteSysAreaSortByIds(Long[] ids)
    {
        return sysAreaSortMapper.deleteSysAreaSortByIds(ids);
    }

    /**
     * 删除SysAreaSort信息
     * 
     * @param id SysAreaSortID
     * @return 结果
     */
    @Override
    public int deleteSysAreaSortById(Long id)
    {
        return sysAreaSortMapper.deleteSysAreaSortById(id);
    }
}
